package com.dc.project.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 角色部门关联表(SysRoleDept)实体类
 *
 * @author zhuangcy
 * @since 2021-06-04 17:09:04
 */
@TableName("sys_role_dept")
@Data
@ApiModel(value = "角色部门关联表")
public class SysRoleDept implements Serializable {
    private static final long serialVersionUID = 823985995036615562L;
    /**
     * 角色部门id
     */
    @NotNull(message = "角色部门id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "role_dept_id", type = IdType.AUTO)
    @ApiModelProperty(name = "roleDeptId", value = "角色部门id")
    private Long roleDeptId;
    /**
     * 角色id
     */
    @NotNull(message = "角色id不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "role_id")
    @ApiModelProperty(name = "roleId", value = "角色id")
    private Integer roleId;
    /**
     * 部门id
     */
    @NotNull(message = "部门id不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "dept_id")
    @ApiModelProperty(name = "deptId", value = "部门id")
    private Integer deptId;


}